package com.light.common;

import java.util.Date;

import com.light.modules.admin.system.model.SysUser;

public class ZcurdConst {
	/**管理后台路径**/
	public final static String ADMINPATH = "/admin";
	/** 后台session user key **/
	public final static String ADMIN_SESSIOIN_USER_KEY = "sysUser";
	/** 超级管理员用户名**/
	public final static String ADMIN_USERNAME = "admin";
	/**菜单权限**/
	public static final String ADMIN_MENULIST = "menuList";
	/**页面权限**/
	public static final String ADMIN_NOAUTHURL = "noAuthUrl";
	/**按钮权限**/
	public static final String ADMIN_NOAUTHBTNURL = "noAuthBtnUrl";
	/**数据权限**/
	public static final String ADMIN_NOAUTHDATARULE = "noAuthDatarule";
	/**按钮权限 TODO **/
	public static final String ADMIN_PAGEBTNMAP = "pageBtnMap";
	
	/**
	 * 系统约定字段-增加
	 */
	public static Object[][] getSystemDefField4Add(SysUser user) {
		return new Object[][] {
				{"sys_create_user_id", user.getId()}, 
				{"sys_create_user", user.getUserName()}, 
				{"sys_create_time", new Date()},
				
				{"sys_update_user_id", user.getId()}, 
				{"sys_update_user", user.getUserName()}, 
				{"sys_update_user_number", user.getUserName()}, 
				{"sys_update_time", new Date()}
		};
	}
	
	/**
	 * 系统约定字段-修改
	 */
	public static Object[][] getSystemDefField4Update(SysUser user) {
		return new Object[][] {
				{"sys_update_user_id", user.getId()}, 
				{"sys_update_user_number", user.getUserName()}, 
				{"sys_update_user", user.getUserName()}, 
				{"sys_update_time", new Date()}
		};
	}

}
